package com.wzy.orderapi.feignclient;

import com.wzy.orderapi.model.dto.OrderDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Collection;

@FeignClient("order-service")
@RequestMapping("order")
public interface OrderFeignClient {

    @PostMapping("save")
    boolean saveOrder(@RequestBody OrderDto orderDto);

    @GetMapping("findAll")
    Collection <OrderDto> findAll();
}
